package top.kuanghua.uploadapi.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Title: UploadController @Description: @Auther:jzfai @Version: 1.0
 * @create 2020/3/4 21:58
 */
@FeignClient(name = "fai-upload")
@RequestMapping("upload")
public interface UploadFeign {
    @PostMapping("image")
    String uploadImage(@RequestParam("file") MultipartFile file);
    /*feign必须指定发送参数的形式@RequestParam("name")*/
    @PostMapping("FeignTest")
    String FeignTest(@RequestParam("name") String name);
}
